config(:basic) do
  nginx = Platform.config.nginx
  config(:nginx, :title => "NGINX设置", :description => "Web代理服务器设置") do
    item(:port, :title => "端 口", :help => "Web代理服务器提供服务端口", :order => 10, :validation => "required digits")
    item(:workers, :title => "服务进程数量", :help => "Web代理服务器启动的进程数", :validation => "required digits")
  end.from do |cfg|
    nginx.reload!
    cfg.port = nginx.port
    cfg.workers = nginx.workers
  end.apply do |data|
    nginx.port = data.port
    nginx.workers = data.workers
    nginx.apply!
  end
end
